import request from '@/utils/request'

export function getTemplateList(query) {
  return request({
    url: '/pagination/template/getList',
    method: 'post',
    data: query
  })
}

export function getTemplateUsableList(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
    return request({
      url: '/pagination/template/getUsableList',
      method: 'post',
      data: query
    })
  }
  
export function getTemplateDetail(id) {
  return request({
    url: '/pagination/template/getDetail',
    method: 'post',
    data: id
  })
}

export function saveTemplate(id) {
  return request({
    url: '/pagination/template/save',
    method: 'post',
    data: id
  })
}

export function removeTemplateByID(id) {
  return request({
    url: '/pagination/template/remove',
    method: 'post',
    data: id
  })
}

export function deleteTemplateByID(id) {
  return request({
    url: '/pagination/template/delete',
    method: 'post',
    data: id
  })
}

export function changeTemplateStatusByID(id) {
  return request({
    url: '/pagination/template/change-status',
    method: 'post',
    data: id
  })
}

